package main

import "fmt"

//定义uab接口
type USB interface {
	read()
	write()
}

type Computer struct {
}

type Mobile struct {
}

func main() {
	c := Computer{}
	m := Mobile{}

	c.read()
	c.write()
	m.read()
	m.write()
}

//实现usb方法
func (c Computer) read() {
	fmt.Println("Computer read.....")
}

func (c Computer) write() {
	fmt.Println("Computer write.....")
}

func (c Mobile) read() {
	fmt.Println("Mobile read.....")
}

func (c Mobile) write() {
	fmt.Println("Mobile write.....")
}
